#target you can change test to what you want
#目标文件名，输入任意你想要的执行文件名
TARGET  := si5341.elf
  
#compile and lib parameter
#编译参数
CC      := aarch64-linux-gnu-gcc
LIBS    :=
LDFLAGS :=
DEFINES :=
INCLUDE := -I.
CFLAGS  := -g -Wall -O0 $(DEFINES) $(INCLUDE)
CXXFLAGS:= $(CFLAGS) -DHAVE_CONFIG_H

SOURCE  := $(wildcard *.c) $(wildcard *.cpp)
OBJS    := $(patsubst %.c,%.o,$(patsubst %.cpp,%.o,$(SOURCE)))

#i think you should do anything here
#下面的基本上不需要做任何改动了
.PHONY :

hello :
	echo "hello world!"
	
everything : $(TARGET)

all : $(TARGET)

objs : $(OBJS)

rebuild: clean everything
                
clean :
	rm -fr *.so
	rm -fr *.o
	rm -rf $(TARGET)
    
  
$(TARGET) : $(OBJS)
	$(CC) $(CXXFLAGS) -o $@ $(OBJS) $(LDFLAGS) $(LIBS)
	
	